﻿
namespace Quotation.Stock
{
    public sealed class TradeStatus : StrictFlagBase<char, TradeStatus>
    {
        private TradeStatus(char value) : base(value) { }

        public static readonly TradeStatus 首日上市 = new TradeStatus('Y');
        public static readonly TradeStatus 非首日上市 = new TradeStatus('N');
        public static readonly TradeStatus 风险警示 = new TradeStatus('R');
        public static readonly TradeStatus 退市 = new TradeStatus('E');

        /// <summary>
        /// 隐式类型转换
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static implicit operator TradeStatus(char value)
        {
            TradeStatus rtn;
            TradeStatus.TryConvert(value, out rtn);
            return rtn;
        }
    }
}
